package com.dyz.leetcode._19_greedy;

public class _55_canJump {
    public boolean canJump(int[] nums) {
        int amxPos = 0;
        for (int i = 0; i <nums.length ; i++) {
            if(amxPos<i){return false;}
            amxPos = Math.max(amxPos, i+nums[i]);
        }
        return true;
    }
}
